﻿using System;
using Ayatta.Contract.Domain;

namespace Web.Core.OAuths
{
    public static class OAuthClientFactory
    {
        public static IOAuthClient Create(OAuth auth)
        {
            switch (auth.Name.ToLower())
            {
                case "qq":
                    return new QqClient(auth);
                case "sina":
                    return new SinaClient(auth);
                default: throw new NotSupportedException();
            }
        }
    }
}